function validateDouble(evt, comp) {
	var theEvent = evt || window.event;
	var key = theEvent.keyCode || theEvent.which;
	
	if (key == 8 || key == 37 || key == 39) {
		theEvent.returnValue = true;
		return true;
	} else {
		key = String.fromCharCode(key);
		var st = comp.value.toString();
		var regex = /[0-9]|\./;
		
		if (st.indexOf(".") !== -1 && key == ".") {
			theEvent.returnValue = false;
			if (theEvent.preventDefault)
				theEvent.preventDefault();
		} else {
			if (!regex.test(key)) {
				theEvent.returnValue = false;
				if (theEvent.preventDefault)
					theEvent.preventDefault();
			}
		}
	}
}